<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" session="false"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<style type="text/css">
body{
background-color:#384048;
}
h1{
color:#D3D3D3;
}
#b{
font-family:Times New Roman;
color:#D3D3D3;
font-size:25px;
}
#d1{
color:#D3D3D3;
font-size:85px;
}
#s1{
font-size:15px;
color:#5F9EA0;
}
input[type="submit"] {
   	background-color:#384048;
    border:3;
    border-color:#5F9EA0;
</style>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login</title>
</head>
<body onload="init()">
<%
	
    Cookie [] call = request.getCookies();
    String vuser="";
    if (call != null){
        for(int i = 0; i < call.length; i++){
            Cookie c =call[i];
                if(c.getName().equals("uname")){
                    vuser = c.getValue();
                
                }
        }
    }
%>
<br>
<br>
<div id="d1" align="center">
A Journey of a Thousand Songs
</div>
<br>
<br>
<br>
<br>
<br>
<h1 align="center">Login to your account</h1>
<form action="ServletValidate">
<div id="b" align="center">
Username: <input type="text" name="uname">
Password: <input type="password" name="pass">
<input type="submit" id="s1" value="login">
<br>
New here? <a href="reg.jsp" style="color:#5F9EA0"">Register</a>
<br>
<br>
<%
    String vmsg = (String) request.getAttribute("vmsg");
    if (vmsg == null)
        out.println("Pls. login to your account.");
    else{
    	out.println("<br>"+vmsg);
    }
%>
</div>
</form>
</body>
</html>